package com.it.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.it.core.dao.UserDao;
import com.it.core.po.User;
import com.it.core.service.UserService;

@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {
	//注入UserDao
	@Autowired
	private UserDao userDao;

	// 通过账号和密码查询用户
	@Override
	public User findUser(String username, String passwrod) {
		User user = userDao.findUser(username, passwrod);
		return user;
	}

	@Override
	public Integer addUser(User user) {
		return userDao.addUser(user);
	}

}
